feat: 기사 제목 추출 및 DOM JSON Minify 도구 추가 - #376
Conversation
DOM JSON 데이터에서 기사 제목(headline)만 추출하여 텍스트 파일로 저장하는 `tools/extract_headlines.py` 도구와 띄어쓰기를 최소화하여 JSON 크기를 줄이는 `tools/minify_dom.py` 도구를 추가했습니다.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
1. `tests/test_tools_extract_headlines.py`와 `tests/test_tools_minify_dom.py`에서 `runpy.run_module("__main__")` 실행 시 발생하는 "found in sys.modules ... unpredictable behaviour" `RuntimeWarning`을 `warnings.catch_warnings`를 통해 무시하도록 테스트 코드를 수정했습니다.
2. 린터(`ruff`)가 지적한 'Module level import not at top of file' 에러(`E402`)를 해결하기 위해 `sys.path` 조작 이후의 `import` 구문에 `# noqa: E402`를 추가했습니다.
3. 관련 테스트 코드를 수정한 후 `uv run pytest` 명령어를 통해 100% 브랜치 커버리지를 재확인했습니다.
| warnings.filterwarnings("ignore", category=RuntimeWarning) | ||
| try: | ||
| runpy.run_module("tools.extract_headlines", run_name="__main__") | ||
| except SystemExit: |
| warnings.filterwarnings("ignore", category=RuntimeWarning) | ||
| try: | ||
| runpy.run_module("tools.minify_dom", run_name="__main__") | ||
| except SystemExit: |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headade66f13e4718fd213a3978c3d17124f8f9fe585. -
Head SHA:
ade66f13e4718fd213a3978c3d17124f8f9fe585 -
Workflow run: 29929099156
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Test (2 files)"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test (2 files)"]
R2 --> V2["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (3 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (3 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Test (2 files)"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test (2 files)"]
R2 --> V2["targeted test run"]
|
What (구현 내용)
tools/extract_headlines.pyCLI 도구를 구현했습니다.tools/minify_dom.pyCLI 도구를 추가했습니다.tests/test_tools_extract_headlines.py,tests/test_tools_minify_dom.py)를 추가했습니다.CHANGELOG.md의## [Unreleased]하위### Added섹션에 신규 도구 2종에 대한 내용을 추가했습니다.Why (해결하는 문제)
indent)가 되어 있어 파일 크기가 큽니다. 시스템 연동 시 네트워크 전송 및 스토리지 효율을 높이기 위해 불필요한 공백을 제거하는 Minify 도구가 필요했습니다.Impact (성능/영향)
Measurement (측정/검증 방법)
uv run pytest --cov=tools --cov-branch --cov-report=term-missing --cov-fail-under=100명령어를 통해extract_headlines.py및minify_dom.py코드에 대해 100% 브랜치 커버리지를 달성함을 확인했습니다.uv run ruff format및uv run ruff check --fix를 통해 린터 오류가 없음을 검증했습니다.PR created automatically by Jules for task 1490677108389924306 started by @seonghobae